package dp.dao;

import java.util.List;

/**
 * 存放分页数据
 * @author chensh
 *
 * @param <E>
 */
public class PagingList<E> {

    long count;
    int pageTotal;
    int pageSize;
    int pageIndex;
    List<E> list;//当前页记录

    /**
     * 构造分页List
     * @param count 总数量
     * @param list 当前页的List
     */
    public PagingList(long count, List<E> list, int pageTotal, int pageIndex, int pageSize) {
        super();
        this.count = count;
        this.list = list;
        this.pageIndex = pageIndex;
        this.pageTotal = pageTotal;
        this.pageSize = pageSize;
    }

    /**
     * 返回当前页的List
     * @return 当前页的记录
     */
    public List<E> getList() {
        return list;
    }

    /**
     * 返回总记录数
     * @return 总记录数
     */
    public long getCount() {
        return count;
    }

	public int getPageTotal() {
		return pageTotal;
	}

	public int getPageSize() {
		return pageSize;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public void setPageTotal(int pageTotal) {
		this.pageTotal = pageTotal;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public void setList(List<E> list) {
		this.list = list;
	}
}
